package com.itkaisa.wallet.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.itkaisa.wallet.pojo.Account;
import org.apache.ibatis.annotations.Mapper;

import java.math.BigDecimal;
import java.util.List;

/**
 * @author HP
 * @version 1.0
 * @description TODO
 * @date 2023/3/16 2:18
 */
@Mapper
public interface AccountMapper extends BaseMapper<Account> {

    /**
     * 查询钱包余额
     * @return 余额
     */
     Double selectByBalance(int userId);

    /**
     * 用户消费100接口
     * @param userId 用户id
     * @param amount 消费金钱
     * @return
     */
     boolean cost100(int userId,Integer amount);

    /**
     * 用户回退20接口
     * @param userId 用户id
     * @param amount 回退金钱
     * @return
     */
     void refund20(int userId,Integer amount);
}
